#ifndef   ZGW_HID_WII_H
#define 	 ZGW_HID_WII_H


#define		CLR_CAMERA_RESET_PIN		HID_GPIO_write(16,0)
#define		SET_CAMERA_RESET_PIN		HID_GPIO_write(16,1)
#define		OUTSIDE_TRIGER				HID_GPIO_read(14)



#define 	ACTIVE 0x1
#define		REMOTE				2
#define		BALANCE_BOARD		3
#define		SELF_HELP			4
#define		REMOTE_2_IN_1		5

#define		STANDBY				0
#define		LINK				2

#define DATA_MOTIONPLUS 0
#define DATA_NUNCHUK 0x1

#define DATA_EXTERNTION 2
#define NUNCHUK 3
#define CLASSIC_CONTROLLER 4

#define	LEN_20S 200*20	//20s == 1S*20 1S==5ms*200
#define		REMOTE_WITH_MP
#define		DIGTAL_GYRO





typedef void (*cmd_handler)(void);
typedef void (*t_wiiFUn_np)(void);
typedef void (*t_wiiFUn_1p)(u_int8 flag);
typedef void (*t_Process_WiiPacket)(const u_int8 *data, u_int32 length,u_int8 flag);
typedef void (*t_KeyHandler)(u_int32 key);



void Comand10_handler(void);
void Comand11_handler(void);
void Comand12_handler(void);
void Comand13_handler(void);
void Comand14_handler(void);
void Comand15_handler(void);
void Comand16_handler(void);
void Comand17_handler(void);
void Comand18_handler(void);
void Comand19_handler(void);
void Comand1A_handler(void);


void InputReport30Handler(void);
void InputReport31Handler(void);
void InputReport32Handler(void);
void InputReport33Handler(void);
void InputReport34Handler(void);
void InputReport35Handler(void);
void InputReport36Handler(void);
void InputReport37Handler(void);
void InputReport3DHandler(void);
void InputReport3EFHandler(void);
void InputReport40Handler(void);
void InputReport41Handler(void);



void wii_KeyHandler(u_int32 key);
void wii_pskey_init(u_int8 *ps);
void wii_ConnectDone(u_int8 result,u_int16 handle);
void wii_MatchCodeDone(u_int8 result);
void wii_Schedule(void);
void wii_process_rxPacket(const u_int8 *data, u_int32 length,u_int8 flag);
void wii_init(void);
void Wii_Disconnect(u_int8 ErrorCode);




#endif

